﻿

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Simple.Service;

ServiceHelper.RunAsService( new TestService() , Environment.GetCommandLineArgs());

public class TestService : IServiceModule
{
    public ServiceXml serviceOptions { get;}

    public TestService()
    {
        serviceOptions = new ServiceXml { 
            id = "TestService",
            name= "TestService",
            description = "测试服务"
        };
    }

    public void ConfigApp(HostBuilderContext appContext, IConfigurationBuilder configuration)
    {
        Console.WriteLine("注册测试服务管道");
    }

    public void ConfigService(IServiceCollection services)
    {
        Console.WriteLine("配置测试服务");
    }
}

